﻿namespace ChinaUnicom.Models
{
    using System;

    public class FeeHistory
    {
        public FeeHistory()
        {
            Occurred = DateTime.Now.AddYears(-1);
            Started = DateTime.Now;
            Ended = DateTime.Now;
            Items = new ItemCollection();
        }

        public void UpdateOccurred(int your, int month)
        {
            Occurred = new DateTime(your, month, 1);
            Started = new DateTime(Occurred.Year, Occurred.Month, 1);
            Ended = Started.AddMonths(1).AddMilliseconds(-1);
        }

        public DateTime Occurred { get; set; }

        public DateTime Started { get; set; }

        public DateTime Ended { get; set; }

        public string Fee { get; set; }

        public ItemCollection Items { get; set; }
    }
}
